import { defineStore } from 'pinia'
import { ref } from 'vue'
import defaultSettings from '@/settings'

export const useSettingStore = defineStore(
  'setting',
  () => {
    const { fixedHeader, sidebarLogo } = defaultSettings
    const fixedHeaderStore = ref()
    fixedHeaderStore.value = fixedHeader

    // 定义好的仓库要暴露出去属性、方法
    return {
      fixedHeaderStore
    }
  },
  {
    persist: true //持久化
  }
)
